Consider a heavy iron ball (colored red in the diagram below) placed on one of the seven levels of the Tower of Pisa. On the highest level (7) the ball has a high potential energy which is given up as heat and destructive work when it falls to the ground (level 0). If the ball is placed on a lower level (e.g. 4 or 1) its potential energy is correspondingly lower, and less energy is released on falling. The lower the potential energy of the ball, the greater is its thermodynamic stability. The most stable state is at ground level (0).
When applied to chemical systems, thermodynamic stability refers to relative energies. If a compound having the formula C2H6O is burned, heat is produced in the following exothermic reaction.

C2H6O   +   3O2     2CO2   +   3H2O  +   Energy
The carbon dioxide and water represent the ground level in our analogy, so the reactants (C2H6O & O2 ) are at a higher level. Now there are two constitutional isomers of C2H6O, ethyl alcohol and dimethyl ether. The heat evolved when the alcohol is burned is less than the heat produced from the ether combustion. From this fact it is clear that the potential energy of the ether is greater (level 7 for example) than the potential energy of the alcohol (level 6 by comparison).